<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>JSON</title>
	</head>
	<body>
		<h1>JSON对象创建</h1>
		<script>
			person = {
				name:'jack',
				age :30,
				addr:{
					homeAddr:'太原小店区',
					workAdder:'太原迎泽区'
				}//最后一个属性值后不加，
			};
			alert(person.name);//两种方式取得对象属性值
			alert(person['age']);  //""也行
			
			alert(person.addr.homeAddr);
			student = [
				{
					name:'css',
					age:23
				},
				{
					name:'zzz',
					age:24
				}
			];
	
    s = {
    	"sites": [{ 
    	"name":"菜鸟教程" , "url":"www.runoob.com" },{ 
    	"name":"google" , "url":"www.google.com" },{
    	"name":"微博" , "url":"www.weibo.com" }]
		}
			alert(student[1].age);
		</script>
	</body>
</html>
